package com.cuanbobox.bean;


import com.cuanbobox.utils.CmdUtil;

/**
 * 要发送指令的封装类
 */
public class DataBean {
    //要发送的指令
    private String data;
    //延迟的时间，单位ms（毫秒）
    private long delay;
    private long time;


    public DataBean(String data) {
        this.data = CmdUtil.getFmtDate(data);

    }

    public DataBean(String data, long delay) {
        this.data = CmdUtil.getFmtDate(data);
        this.delay = delay;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = CmdUtil.getFmtDate(data);
    }

    public long getDelay() {
        return delay;
    }

    /**
     * 设置要执行的时间
     *
     * @param delay 延迟的时间，单位ms（毫秒）
     */
    public void setDelay(long delay) {
        this.delay = delay;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "DataBean{" +
                "data='" + data + '\'' +
                ", delay=" + delay +
                ", time=" + time +
                '}';
    }
}
